package com.dao;

import com.domain.Depart;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Author: shineZhao
 * @Date: 2020/10/12 15:23
 * @Description:
 */
public interface DepartMapper {

    @Insert("insert into Depart(message,duty,manager) values(#{message},#{duty} ,#{manager})")
    void add(Depart depart);

    @Delete("delete from Depart where id = #{id}")
    void deleteById(int id);

    @Update("update Depart set message = #{message},duty = #{duty}, manager = #{manager} where id = #{id}")
    void update(Depart depart);

    @Select("select * from Depart")
    List<Depart> findAll();
}
